using Catalog.Application.CatalogItems.Commands;
using Microsoft.Extensions.DependencyInjection;

namespace Catalog.Application;

public static class ServiceCollectionExtensions
{
    public static IServiceCollection AddCatalogApplication(this IServiceCollection services)
    {
        services.AddMediatR(cfg =>

            {
                cfg.RegisterServicesFromAssembly(typeof(CreateCatalogItemCommandHandler).Assembly);
            });

        return services;
    }
}